/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.dengues.model.database;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>EMF Data Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.dengues.model.database.DatabasePackage#getEMFDataType()
 * @model
 * @generated
 */
public enum EMFDataType implements Enumerator
{
    /**
     * The '<em><b>DATABASE</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #DATABASE_VALUE
     * @generated
     * @ordered
     */
    DATABASE(0, "DATABASE", "DATABASE"),
    /**
     * The '<em><b>QUERY</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #QUERY_VALUE
     * @generated
     * @ordered
     */
    QUERY(1, "QUERY", "QUERY"),
    /**
     * The '<em><b>MAPPER</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #MAPPER_VALUE
     * @generated
     * @ordered
     */
    MAPPER(2, "MAPPER", "MAPPER"), /**
     * The '<em><b>FILE XML</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #FILE_XML_VALUE
     * @generated
     * @ordered
     */
    FILE_XML(3, "FILE_XML", "FILE_XML"), /**
     * The '<em><b>FILE CSV</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #FILE_CSV_VALUE
     * @generated
     * @ordered
     */
    FILE_CSV(4, "FILE_CSV", "FILE_CSV"), /**
     * The '<em><b>FILE EXCEL</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #FILE_EXCEL_VALUE
     * @generated
     * @ordered
     */
    FILE_EXCEL(5, "FILE_EXCEL", "FILE_EXCEL"), /**
     * The '<em><b>SCRIPTS</b></em>' literal object.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #SCRIPTS_VALUE
     * @generated
     * @ordered
     */
    SCRIPTS(100, "SCRIPTS", "SCRIPTS");
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static final String copyright = "// ============================================================================\r\n//\r\n// Copyright (C) 2006-2007 Dengues\r\n//\r\n// Google Group: http://groups.google.com/group/dengues\r\n// QQ Group: 24885404\r\n//\r\n// This library is free software; you can redistribute it and/or\r\n// modify it under the terms of the GNU Lesser General Public\r\n// License as published by the Free Software Foundation; either\r\n// version 2.1 of the License.\r\n//\r\n// This library is distributed in the hope that it will be useful,\r\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n// Lesser General Public License for more details.\r\n//\r\n// You should have received a copy of the GNU General Public License\r\n// along with this program; if not, write to the Free Software\r\n// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r\n//\r\n// ============================================================================\r\n";

    /**
     * The '<em><b>DATABASE</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>DATABASE</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #DATABASE
     * @model
     * @generated
     * @ordered
     */
    public static final int DATABASE_VALUE = 0;

    /**
     * The '<em><b>QUERY</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>QUERY</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #QUERY
     * @model
     * @generated
     * @ordered
     */
    public static final int QUERY_VALUE = 1;

    /**
     * The '<em><b>MAPPER</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>MAPPER</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #MAPPER
     * @model
     * @generated
     * @ordered
     */
    public static final int MAPPER_VALUE = 2;

    /**
     * The '<em><b>FILE XML</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>FILE XML</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #FILE_XML
     * @model
     * @generated
     * @ordered
     */
    public static final int FILE_XML_VALUE = 3;

    /**
     * The '<em><b>FILE CSV</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>FILE CSV</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #FILE_CSV
     * @model
     * @generated
     * @ordered
     */
    public static final int FILE_CSV_VALUE = 4;

    /**
     * The '<em><b>FILE EXCEL</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>FILE EXCEL</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #FILE_EXCEL
     * @model
     * @generated
     * @ordered
     */
    public static final int FILE_EXCEL_VALUE = 5;

    /**
     * The '<em><b>SCRIPTS</b></em>' literal value.
     * <!-- begin-user-doc -->
     * <p>
     * If the meaning of '<em><b>SCRIPTS</b></em>' literal object isn't clear,
     * there really should be more of a description here...
     * </p>
     * <!-- end-user-doc -->
     * @see #SCRIPTS
     * @model
     * @generated
     * @ordered
     */
    public static final int SCRIPTS_VALUE = 100;

    /**
     * An array of all the '<em><b>EMF Data Type</b></em>' enumerators.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private static final EMFDataType[] VALUES_ARRAY =
        new EMFDataType[] {
            DATABASE,
            QUERY,
            MAPPER,
            FILE_XML,
            FILE_CSV,
            FILE_EXCEL,
            SCRIPTS,
        };

    /**
     * A public read-only list of all the '<em><b>EMF Data Type</b></em>' enumerators.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static final List<EMFDataType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

    /**
     * Returns the '<em><b>EMF Data Type</b></em>' literal with the specified literal value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static EMFDataType get(String literal) {
        for (int i = 0; i < VALUES_ARRAY.length; ++i) {
            EMFDataType result = VALUES_ARRAY[i];
            if (result.toString().equals(literal)) {
                return result;
            }
        }
        return null;
    }

    /**
     * Returns the '<em><b>EMF Data Type</b></em>' literal with the specified name.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static EMFDataType getByName(String name) {
        for (int i = 0; i < VALUES_ARRAY.length; ++i) {
            EMFDataType result = VALUES_ARRAY[i];
            if (result.getName().equals(name)) {
                return result;
            }
        }
        return null;
    }

    /**
     * Returns the '<em><b>EMF Data Type</b></em>' literal with the specified integer value.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public static EMFDataType get(int value) {
        switch (value) {
            case DATABASE_VALUE: return DATABASE;
            case QUERY_VALUE: return QUERY;
            case MAPPER_VALUE: return MAPPER;
            case FILE_XML_VALUE: return FILE_XML;
            case FILE_CSV_VALUE: return FILE_CSV;
            case FILE_EXCEL_VALUE: return FILE_EXCEL;
            case SCRIPTS_VALUE: return SCRIPTS;
        }
        return null;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private final int value;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private final String name;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private final String literal;

    /**
     * Only this class can construct instances.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EMFDataType(int value, String name, String literal) {
        this.value = value;
        this.name = name;
        this.literal = literal;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public int getValue() {
      return value;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getName() {
      return name;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getLiteral() {
      return literal;
    }

    /**
     * Returns the literal value of the enumerator, which is its string representation.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public String toString() {
        return literal;
    }
}
